package com.chance.cc.crawler.prod.command.trigger.domain.vm.pcauto;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.geely.PcAutoForumGeelyReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.geely.PcAutoForumGeelyTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.realtime.PcAutoArticleCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.realtime.PcAutoForumReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.realtime.PcAutoPraiseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.realtime.PcAutoVideoCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.trace.PcAutoArticleTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.trace.PcAutoForumReplyCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.trace.PcAutoPraiseTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.pcauto.trace.PcAutoVideoTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-09 16:15:28
 * @email okprog@sina.com
 */
public class PCAutoCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
//        publishPcAutoArticleCrawlerScheduleTriggerInfo();
//        publishPcAutoArticleTraceCrawlerScheduleTriggerInfo();
//        publishPcAutoForumReleaseCrawlerScheduleTriggerInfo();
//        publishPcAutoForumReplyCrawlerScheduleTriggerInfo();
//        publishPcAutoVideoCrawlerScheduleTriggerInfo();
//        publishPcAutoVideoTraceCrawlerScheduleTriggerInfo();
//        publishPcAutoPraiseCrawlerScheduleTriggerInfo();
//        publishPcAutoPraiseTraceCrawlerScheduleTriggerInfo();

        //吉利项目
      //  publishPcAutoForumGeelyRealtimeCrawlerScheduleTriggerInfo();
        publishPcAutoForumGeelyTraceCrawlerScheduleTriggerInfo();
    }

    /**
     * 发布太平洋新闻trigger info

     */
    public static void publishPcAutoArticleCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoArticleCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoArticleCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "太平洋新闻实时采集任务执行，每小时执行一次"
        );
    }
    /**
     * 发布太平洋新闻回溯trigger info

     */
    public static void publishPcAutoArticleTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoArticleTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoArticleTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "太平洋新闻回溯七天回复采集任务执行，每天执行一次"
        );
    }
    /**
     * 发布太平洋论坛trigger info

     */
    public static void publishPcAutoForumReleaseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoForumReleaseCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoForumReleaseCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "太平洋论坛实时采集任务执行，每小时执行一次"
        );
    }
    /**
     * 发布太平洋新闻回溯trigger info

     */
    public static void publishPcAutoForumReplyCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoForumReplyCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoForumReplyCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "太平洋论坛回溯一天回复采集任务执行，每天执行一次"
        );
    }



    /**
     * 发布太平洋视频trigger info

     */
    public static void publishPcAutoVideoCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoVideoCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoVideoCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "太平洋视频实时采集任务执行，每小时执行一次"
        );
    }
    /**
     * 发布太平洋视频回溯trigger info

     */
    public static void publishPcAutoVideoTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoVideoTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoVideoTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "太平洋视频回溯七天回复采集任务执行，每天执行一次"
        );
    }




    /**
     * 发布太平洋口碑trigger info

     */
    public static void publishPcAutoPraiseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoPraiseCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoPraiseCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "太平洋口碑实时采集任务执行，每小时执行一次"
        );
    }
    /**
     * 发布太平洋口碑回溯trigger info

     */
    public static void publishPcAutoPraiseTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoPraiseTraceCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoPraiseTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "太平洋口碑回溯七天回复采集任务执行，每天执行一次"
        );
    }



    /**
     * 吉利项目 太平洋论坛发布时间采集
     */
    public static void publishPcAutoForumGeelyRealtimeCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoForumGeelyReleaseCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoForumGeelyReleaseCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
//                "",
                "吉利项目太平洋论坛发布时间排序，每日17采集一次"
        );
    }


    /**
     * 吉利项目 太平洋论坛回复时间采集
     */
    public static void publishPcAutoForumGeelyTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = PcAutoForumGeelyTraceCrawlerSchedulerJob.pcAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                PcAutoForumGeelyTraceCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
//                "",
                "吉利项目太平洋论坛回复时间排序，每日17采集一次"
        );
    }
}
